package apoc.core.plugin.tick;

import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.relauncher.Side;

import java.util.EnumSet;

public interface ITickHandler
{

    /**
     * Called at the "start" phase of a tick
     * <p/>
     * Multiple ticks may fire simultaneously- you will only be called once with all the firing ticks
     *
     * @param type
     * @param tickData
     */
    public void tickStart(EnumSet<TickEvent.Type> type, Object... tickData);

    /**
     * Called at the "end" phase of a tick
     * <p/>
     * Multiple ticks may fire simultaneously- you will only be called once with all the firing ticks
     *
     * @param type
     * @param tickData
     */
    public void tickEnd(EnumSet<TickEvent.Type> type, Object... tickData);

    /**
     * Returns the list of ticks this tick handler is interested in receiving at the minute
     */
    public EnumSet<TickEvent.Type> ticks();

    public Side side();

}
